Skip to main content

ComponentTests

Sankey Chart – Component test plan

Sub-components: Node, Callout, Labels,

  1. Node: Node data, Node color, Node label
  2. Callout: Default callout
  3. Labels: Default labels
Test stepsValidationTool used
Test 1: [Snapshot testing]
- With only data prop, string data as node ID.Should render sankey chart with axis correctlyRTL
- With only data prop, numeric data as node ID.Should render sankey chart with axis correctlyEnzyme
- With node color and border colorsShould render Sankey chart with specified node and border colorsEnzyme
Test 2: Render calling with respective to props
- No prop changes: Mount Sankey chart and then set the same props againRender function should have been called twiceEnzyme
- Prop changes: Mount Sankey chart and then set some other propRender function should have been called twiceEnzyme
Test 3: Mouse events
- Mouse over on a nodeShould update Sankey chart correctly on mouseoverEnzyme
- Mouse over on linkShould update Sankey chart correctly on mouseoverEnzyme
- Mouse click on a nodeShould update node and path color based on the linkRTL
Test 4: [Sub-Component]: Node
- Specify node colorShould render node with the specified colorEnzyme
- With node description is largeShould render tooltip correctly when node description is largeEnzyme
Test 5: [Sub-Component]: Callout
- Hover mouse over a link to display calloutShould show the default callout over that linkEnzyme
Test 6: [Sub-Component]: Labels
- Set node name to “x”Should render node name properlyRTL
Test 7: Theme changed to Dark ThemeShould reflect theme changeRTL